home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 6
/
FM Towns Free Software Collection 6.iso
/
ms_dos
/
txf
/
src
/
txf.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-08
|
8KB
|
302 lines
/**************** txf.h *******************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <jctype.h>
#include <jstring.h>
#include <dos.h>
#include <io.h>
#include <fcntl.h>
#define NUL 0
#define TAB 0x09
#define RET 0x0A
#define TRUE 1
#define FALSE 0
#define MAX_STR 12
#define EX_MAX 300
#define PARA_MAX 1000
#define KFL_MAX 160
#define KQ__MAX 80
#define NP_DEL 4
#ifdef MAIN
int tmpinfile=-1;
char inputfile[80]; /* -i */
char outputfile[80]; /* -o */
char wcfile[80]; /* -io */
char bakfile[80]; /* -rb */
int tabsize=8; /* -t */
int tabx=0; /* -x tab展開 */
int maxc=76; /* -l */
int cent=0; /* -c */
int left=-1; /* -ml */
int right=-1; /* -mr */
int retflg=0; /* -r */
int quoteflg=0; /* -q 引用文 */
int base=-1; /* -b */
char tfile[2][64]; /* -d */
int exflg=0; /* -e */
int format=1; /* -n,-f */
int viewmode=0; /* -v */
char sep=0x22; /* -s */
int removeeofflg=0; /* -rz */
int removebakfile=0; /* -rb */
int useoldex=0; /* -ep,-es */
int setline=0; /* -z */
char *exold[EX_MAX],*exnew[EX_MAX],*exattr[EX_MAX];
char *exptr[EX_MAX],*exattrptr[EX_MAX]; /* -e */
char *para[PARA_MAX];
char *kl,*kf,*kq;
#if 0
char kl[KFL_MAX]="),.>}]。、!? 、。,.)]}>」」》』】!? "; /* -kl */
char kf[KFL_MAX]="([{「([{<「《『【"; /* -kf */
char kq[KQ__MAX]=">>"; /* -kq */
#endif
int quote=0;
char *basedir;
FILE *input,*output;
long int totalret=0; /* used by LCX */
long int totalretx=0; /* used by LCX */
long int totalsize=0; /* used by LCX */
#if !TXFL
char sfstr[MAX_STR][48]={ "\n*:お知らせ *:掲示板 *:電子会議",
"\nFORUM:","\n>GO ",
"\n>LIB ","\nLIB:","】(DL ",
"\n★FTOWNS1★","\n★FTOWNS2★",
"\nID (改行のみ:自分のHP)\r\n:",
"\nHP:",
"\nID (改行のみ:自分のパティオ)\r\n:",
"\nPATIO:"
};
char logstr_mes1[30]="%% %%%%% ( %%%) %%/%% ";
char logstr_mes2[15]="- ^4MES(%%):";
char logstr_mes3[41]="%%%/%%% ***%%%%% $$$$$$$$$$$$$$$$ ";
char logstr_mes4[42]="%%%%%/%%%%% ***%%%%% $$$$$$$$$$$$$$$$ ";
char logstr_dlib[42]="%%%%$ ***%%%%% %%/%%/%% %%%%%%% %%%% * ";
char logstr_wftowns[5]=" #%";
char logstr_hp[40]="%%% [%%/%%/%% %%:%%] ***%%%%% ";
char logstr_mail[44]="%% $$$$$$$$$$$$$$$$$ ***%%%%% %%/%% %%:%%";
char logstr_ffmtop[22]="%%/%%[^1]^3(DL%%-%%%";
/*
- FFMHOB MES(20):【交 流】自己紹介の場、『無節荘』第10館 92/05/13 -
- FTOWNS1 MES( 7):Gamer’s Q&A(2) 92/05/13 -
20 919 ( 5) 05/13 【交 流】自己紹介の場、『無節荘』第10館
005/005 NBE00503 山口 靖 ストック会議室にも
( 3) 92/09/25 23:08
01453/01453 PFG02442 中谷 友彦 テスト♪てすと♪
( 2) 92/09/22 22:56
ID (改行のみ:自分のHP)
:PEE01244
パスワード
:
20 999 ( 0) 05/16 [交 流]自己紹介の場、『無節荘』第10館
250 PFG02442 92/04/05 25408 25 B TXF136E .EXE テキストファイル フォーマッタ Ver1.36e
12/12[TOWNS] ぼむぼむ (DL 5-433)
12/08[TOWNS] 背景画ランダムセレクター (DL 4-222)
120 [92/05/16 21:14] PEE01244 CATLOG.EXP使ってみました<Yama-chan
*/
char *pfstr[MAX_STR] = {
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
long int log_tline=0;
char log_fname[16]="UNKNOWN";
char log_pname[16]="";
char log_idstr[12]=" ";
char log_libstr[4];
int log_downno;
char log_downname[16]="";
char log_docfile[16]="";
char log_titlestr[48];
char log_resstr[16]="";
char log_resp[12]=" ";
char log_handle[20]=" ";
int log_hpstyle = 0;
int log_mesno;
char log_reply[8];
char *log_bufptr;
char filechr[32]={0,0,0,0,0x5f,0x0c6,0x0ff,0x0c0,0x0ff,0x0ff,0x0ff,0x0e3,0x0ff,
0x0ff,0x0ff,0x0f6,0,0,0,0,0x03,0x0ff,0x0ff,0x0ff,0x0ff,
0x0ff,0x0ff,0x0ff,0,0,0,0};
char npcut_front[4] ={0x1b,0x26,0x36,0x41};
char npcut_tellstr[5]={0x1b,0x26,0x36,0x40,0};
char npcut_nifend[21]={ 0x18,0x1f,0x40,0x40,0x0e,0x20,0x7f,0x7f,0x21,0x4c,
0x3e,0x44,0x3c,0x40,0x40,0x40,0x40,0x20,0x68,0x40,0};
char npcut_niffirst[9]={0x1b,0x23,0x33,0x1b,0x33,0x1b,0x26,0x32,0};
char npcut_weather[10]={0x1b,0x2d,0x57,0x0e,0x21,0x4c,0x20,0x68,0x40,0};
int weatherflg = 0;
int make_val = 0 ;
#endif
time_t ftime[2];
/* use commandfile */
char *fbuf;
int fbufsize=0,fbufptr=0;
#endif
extern int tmpinfile;
extern char inputfile[80]; /* -i */
extern char outputfile[80]; /* -o */
extern char wcfile[80]; /* -io */
extern char bakfile[80]; /* -rb */
extern int tabsize; /* -t */
extern int tabx; /* -x tab展開 */
extern int maxc; /* -l */
extern int cent; /* -c */
extern int left; /* -ml */
extern int right; /* -mr */
extern int retflg; /* -r */
extern int quoteflg; /* -q 引用文 */
extern int base; /* -b */
extern char tfile[2][64]; /* -d */
extern int exflg; /* -e */
extern int format; /* -n,-f */
extern int viewmode; /* -v */
extern char sep; /* -s */
extern int removeeofflg; /* -rz */
extern int removebakfile; /* -rb */
extern int useoldex; /* -ep,-es */
extern int setline; /* -z */
extern char *exold[],*exnew[],*exattr[];
extern char *exptr[],*exattrptr[];/* -e */
extern char *para[];
extern char *kl,*kf,*kq;
#if 0
extern char kl[]; /* -kl */
extern char kf[]; /* -kf */
extern char kq[]; /* -kq */
#endif
extern int quote;
extern char *basedir;
extern FILE *input,*output;
extern long int totalret; /* used by LCX */
extern long int totalretx; /* used by LCX */
extern long int totalsize; /* used by LCX */
#if !TXFL
extern char sfstr[MAX_STR][48];
extern char *pfstr[MAX_STR];
extern char *dlib_bufptr;
extern long int log_tline;
extern char log_fname[16];
extern char log_pname[16];
extern char log_idstr[12];
extern char log_libstr[4];
extern int log_downno;
extern char log_downname[16];
extern char log_docfile[16];
extern char log_titlestr[48];
extern char log_resstr[16];
extern char log_resp[12];
extern char log_handle[20];
extern int log_hpstyle;
extern int log_mesno;
extern char log_reply[8];
extern char *log_bufptr;
extern char logstr_mes1[30];
extern char logstr_mes2[15];
extern char logstr_mes3[41];
extern char logstr_mes4[42];
extern char logstr_dlib[42];
extern char logstr_wftowns[5];
extern char logstr_hp[40];
extern char logstr_mail[44];
extern char logstr_ffmtop[22];
extern char filechr[32];
extern char npcut_front[4];
extern char npcut_tellstr[5];
extern char npcut_nifend[21];
extern char npcut_niffirst[9];
extern char npcut_weather[10];
extern int weatherflg;
extern int make_val;
#endif
extern time_t ftime[2];
extern char *fbuf;
extern int fbufsize,fbufptr;
/* external function */
char *get_filename(char *wildcard);
void lcx(char *lcxinputfile);
void lcxdriver(char **param);
int hex(char *str);
char *ftrans(char *form);
int quotechk(int chr1,int chr2);
char *strspc(char *ptr,char find);
char *ktrans(char *str);
void init_allswitch();
void gettmpfile();
void exchange(char *oldfile,char *newfile);
void exchangedriver();
void old_exchange(char *st1,char *st2,char *oldfile,char *newfile);
void old_exchangedriver();
void setleft();
void setleft0();
int findret(int i,int j,int next1,int next2);
int putret(int i,int old,int chr,int next1,int next2);
int putspace(int num,FILE *file);
void txform(void);
void swchk(int count,char **val);
void mktfilename();
void input_to_output();
void tfileopen(int i);
int wcchk();
void errexit(char *errmes);
void credit(char *name);
void setdefault();
void init(char *name);
void txf();
int main(int argc,char **argv);
void read_def(char *own);
void read_commandfile(char *commandfile);
void savesw(int base);
void mes_forum(int type);
void mesfindstr();
void mes();
void mesinit();
void mesdriver(char **val);
void get_forum(int type);
void get_libno(int type);
void get_titlestr();
void meschk(int style);
void dlibchk(int style);
void ffmtopchk();
void hpchk();
void mailchk();
int matchstr(char *form, char *txtptr);
int linestyle();
void logfindstr();
void log();
void loginit();
void logdriver(char **val);
void removeeof();
void npcutdriver(char **val);